// 按钮优化样式
.el-button {
  transition: all 0.2s ease;
  
  &:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  
  &:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  &:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  &.is-loading {
    opacity: 0.8;
    pointer-events: none;
  }
}

// 表单优化样式
.el-form-item {
  .el-input {
    transition: all 0.2s ease;
    
    &:hover:not(.is-disabled) .el-input__wrapper {
      box-shadow: 0 0 0 1px var(--el-input-hover-border-color) inset;
    }
    
    &.is-focus .el-input__wrapper {
      box-shadow: 0 0 0 1px var(--el-input-focus-border-color) inset;
    }
  }
}

// 卡片优化样式
.el-card {
  transition: all 0.3s ease;
  
  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  }
}

// 消息框优化
.el-message {
  .el-message__content {
    font-weight: 500;
  }
  
  &.el-message--success {
    .el-message__icon {
      animation: successPulse 0.5s ease;
    }
  }
  
  &.el-message--error {
    .el-message__icon {
      animation: errorShake 0.5s ease;
    }
  }
}

// 动画定义
@keyframes successPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

// 加载状态优化
.loading-overlay {
  position: relative;
  
  &::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

// 防抖反馈
.submitting {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
  
  &::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--el-color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
} 